-- GENERATED SPELL FOR [Shadowforge Citizen] --


function spell0_8902(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(40505,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8902', 552, 1)
end

function spell1_8902(pUnit, Event) --@Fire Blast,n/a--
pUnit:FullCastSpellOnTarget(13339,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8902', 583, 1)
end

function spell2_8902(pUnit, Event) --@Frost Nova,Self--
pUnit:FullCastSpellOnTarget(11831,pUnit)
pUnit:RegisterEvent('Sorts_8902', 8315, 1)
end

function spell3_8902(pUnit, Event) --@Heal,Heal--
pUnit:FullCastSpellOnTarget(11642,pUnit)
pUnit:RegisterEvent('Sorts_8902', 3500, 1)
end

function spell4_8902(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(9613,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8902', 3000, 1)
end

function spell5_8902(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(15547,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8902', 545, 1)
end

function spell6_8902(pUnit, Event) --@Strike,n/a--
pUnit:FullCastSpellOnTarget(13446,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8902', 599, 1)
end

function spell7_8902(pUnit, Event) --@Sunder Armor,n/a--
pUnit:FullCastSpellOnTarget(13444,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8902', 30314, 1)
end

function Sorts_8902(pUnit, Event)
local choix_sorts_8902 = math.random(0, 7)
if choix_sorts_8902 == 0 then
pUnit:RegisterEvent('spell0_8902', 1, 1)
end
if choix_sorts_8902 == 1 then
pUnit:RegisterEvent('spell1_8902', 1, 1)
end
if choix_sorts_8902 == 2 then
pUnit:RegisterEvent('spell2_8902', 1, 1)
end
if choix_sorts_8902 == 3 then
pUnit:RegisterEvent('spell3_8902', 1, 1)
end
if choix_sorts_8902 == 4 then
pUnit:RegisterEvent('spell4_8902', 1, 1)
end
if choix_sorts_8902 == 5 then
pUnit:RegisterEvent('spell5_8902', 1, 1)
end
if choix_sorts_8902 == 6 then
pUnit:RegisterEvent('spell6_8902', 1, 1)
end
if choix_sorts_8902 == 7 then
pUnit:RegisterEvent('spell7_8902', 1, 1)
end
end

function mob8902_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_8902', math.random(1500, 3000), 1)
end

function mob8902_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8902_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8902_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(8902, 1, 'mob8902_Action')
RegisterUnitEvent(8902, 2, 'mob8902_Leave')
RegisterUnitEvent(8902, 3, 'mob8902_Kill')
RegisterUnitEvent(8902, 4, 'mob8902_Die')
